package studentcourse.entity;

public class Student {
    private String student_id;
    private String student_name;
    private String student_gender;
    private Course selected_course;

    public Student(String student_id, String student_name, String student_gender) {
        this.student_id = student_id;
        this.student_name = student_name;
        this.student_gender = student_gender;
    }

    public void select_course(Course target_course) {
        this.selected_course = target_course;
    }

    public void drop_course() {
        this.selected_course = null;
    }

    public void print_schedule() {
        if (selected_course != null) {
            System.out.println("课表");
            System.out.println("课程号：" + selected_course.getCourse_id());
            System.out.println("课程名：" + selected_course.getCourse_name());
            System.out.println("地点：" + selected_course.getCourse_location());
            System.out.println("时间：" + selected_course.getCourse_time());
            System.out.println("教师：" + selected_course.getCourse_teacher());
        } else {
            System.out.println("选课空");
        }
    }

    public String getStudent_id() {
        return student_id;
    }

    public void setStudent_id(String student_id) {
        this.student_id = student_id;
    }

    public String getStudent_name() {
        return student_name;
    }

    public void setStudent_name(String student_name) {
        this.student_name = student_name;
    }

    public String getStudent_gender() {
        return student_gender;
    }

    public void setStudent_gender(String student_gender) {
        this.student_gender = student_gender;
    }

    public Course getSelected_course() {
        return selected_course;
    }
}